package com.wpzf.ndhc.utils;

import org.springframework.ui.ModelMap;

import java.util.Map;

public class TableUtil {

    public static Map<String,Object> TableName(Map<String,Object> map){
        if ("null".equals(map.get("year"))) {
            return map;
        }
        map.put("wp_cj_tbxxb","wp_cj_tbxxb_"+map.get("year"));
        map.put("wp_cj_dkxxb","wp_cj_dkxxb_"+map.get("year"));
        map.put("wp_cj_hcrwfpdw","wp_cj_hcrwfpdw_"+map.get("year"));
        map.put("wp_cj_hcrwfpjl","wp_cj_hcrwfpjl_"+map.get("year"));
        map.put("wp_cj_shfpb","wp_cj_shfpb_"+map.get("year"));
        map.put("wp_cj_tbhcjg","wp_cj_tbhcjg_"+map.get("year"));
        map.put("wp_cj_tbhcjg_hftgzmwj","wp_cj_tbhcjg_hftgzmwj_"+map.get("year"));
        map.put("wp_cj_tbhcjg_qtpzwh","wp_cj_tbhcjg_qtpzwh_"+map.get("year"));
        map.put("wp_cj_tbhcjg_qtsftgxxydss","wp_cj_tbhcjg_qtsftgxxydss_"+map.get("year"));
        map.put("wp_cj_tbhcjg_qtsfzygd","wp_cj_tbhcjg_qtsfzygd_"+map.get("year"));
        map.put("wp_cj_tbhcjg_wfpzwh","wp_cj_tbhcjg_wfpzwh_"+map.get("year"));
        map.put("wp_cj_tbhcjg_wftgzmwj","wp_cj_tbhcjg_wftgzmwj_"+map.get("year"));
        map.put("wp_cj_shtb","wp_cj_shtb_"+map.get("year"));
        map.put("wp_cj_thtb","wp_cj_thtb_"+map.get("year"));
        map.put("wp_cj_zgtb","wp_cj_zgtb_"+map.get("year"));
        map.put("wp_cj_fjinfo","wp_cj_fjinfo_"+map.get("year"));
        map.put("wp_cj_dict_fjlx","wp_cj_dict_fjlx_"+map.get("year"));
        map.put("wp_cj_pwinfo","wp_cj_pwinfo_"+map.get("year"));
        map.put("wp_cj_hcrwkc","wp_cj_hcrwkc_"+map.get("year"));
        map.put("wp_cj_thxzq","wp_cj_thxzq_"+map.get("year"));
        map.put("wp_cj_fpdw","wp_cj_fpdw_"+map.get("year"));
        map.put("wp_cj_dkxxbsj","wp_cj_dkxxbsj_"+map.get("year"));
        map.put("wp_cj_fjinfosj","wp_cj_fjinfosj_"+map.get("year"));
        map.put("wp_cj_pwinfosj","wp_cj_pwinfosj_"+map.get("year"));
        map.put("wp_cj_tbhcjgsj","wp_cj_tbhcjgsj_"+map.get("year"));
        map.put("wp_cj_tbhcjgsj_hftgzmwj","wp_cj_tbhcjgsj_hftgzmwj_"+map.get("year"));
        map.put("wp_cj_tbhcjgsj_qtpzwh","wp_cj_tbhcjgsj_qtpzwh_"+map.get("year"));
        map.put("wp_cj_tbhcjgsj_qtsftgxxydss","wp_cj_tbhcjgsj_qtsftgxxydss_"+map.get("year"));
        map.put("wp_cj_tbhcjgsj_qtsfzygd","wp_cj_tbhcjgsj_qtsfzygd_"+map.get("year"));
        map.put("wp_cj_tbhcjgsj_wfpzwh","wp_cj_tbhcjgsj_wfpzwh_"+map.get("year"));
        map.put("wp_cj_tbhcjgsj_wftgzmwj","wp_cj_tbhcjgsj_wftgzmwj_"+map.get("year"));

        map.put("wp_dsfjd_tbhcjg","wp_dsfjd_tbhcjg_"+map.get("year"));
        map.put("wp_dsfjd_tbhcjg_hftgzmwj","wp_dsfjd_tbhcjg_hftgzmwj_"+map.get("year"));
        map.put("wp_dsfjd_tbhcjg_qtpzwh","wp_dsfjd_tbhcjg_qtpzwh_"+map.get("year"));
        map.put("wp_dsfjd_tbhcjg_qtsftgxxydss","wp_dsfjd_tbhcjg_qtsftgxxydss_"+map.get("year"));
        map.put("wp_dsfjd_tbhcjg_qtsfzygd","wp_dsfjd_tbhcjg_qtsfzygd_"+map.get("year"));
        map.put("wp_dsfjd_tbhcjg_wfpzwh","wp_dsfjd_tbhcjg_wfpzwh_"+map.get("year"));
        map.put("wp_dsfjd_tbhcjg_wftgzmwj","wp_dsfjd_tbhcjg_wftgzmwj_"+map.get("year"));

        //年度填报
        map.put("wp_cj_tbxxbxj_nd","wp_cj_tbxxbxj_nd_"+map.get("year"));
        map.put("wp_cj_dkxxbxj_nd","wp_cj_dkxxbxj_nd_"+map.get("year"));
        map.put("wp_cj_dkxxbxj_nd_pw","wp_cj_dkxxbxj_nd_pw_"+map.get("year"));
        map.put("wp_cj_dkxxbxj_nd_lz","wp_cj_dkxxbxj_nd_lz_"+map.get("year"));
        map.put("wp_cj_fjinfo_nd","wp_cj_fjinfo_nd_"+map.get("year"));
        map.put("wp_cj_pwinfo_nd","wp_cj_pwinfo_nd_"+map.get("year"));
        map.put("wp_cj_tbhcjgshij_nd","wp_cj_tbhcjgshij_nd_"+map.get("year"));
        map.put("wp_cj_tbhcjgsj_nd","wp_cj_tbhcjgsj_nd_"+map.get("year"));
        map.put("wp_cj_tbhcjgsj_nd_hftgzmwj","wp_cj_tbhcjgsj_nd_hftgzmwj_"+map.get("year"));
        map.put("wp_cj_tbhcjgsj_nd_qtpzwh","wp_cj_tbhcjgsj_nd_qtpzwh_"+map.get("year"));
        map.put("wp_cj_tbhcjgsj_nd_qtsftgxxydss","wp_cj_tbhcjgsj_nd_qtsftgxxydss_"+map.get("year"));
        map.put("wp_cj_tbhcjgsj_nd_qtsfzygd","wp_cj_tbhcjgsj_nd_qtsfzygd_"+map.get("year"));
        map.put("wp_cj_tbhcjgsj_nd_wfpzwh","wp_cj_tbhcjgsj_nd_wfpzwh_"+map.get("year"));
        map.put("wp_cj_tbhcjgsj_nd_wftgzmwj","wp_cj_tbhcjgsj_nd_wftgzmwj_"+map.get("year"));
        map.put("wp_cj_tbxxbxj_nd","wp_cj_tbxxbxj_nd_"+map.get("year"));
        map.put("wp_cj_gsinfoly_nd","wp_cj_gsinfoly_nd_"+map.get("year"));
        //年度外业
        map.put("re_task_nd","re_task_nd_"+map.get("year"));
        map.put("re_taskdetail_nd","re_taskdetail_nd_"+map.get("year"));
        map.put("re_taskdetail_annex_nd","re_taskdetail_annex_nd_"+map.get("year"));
        map.put("re_taskdetail_annex_deletelog_nd","re_taskdetail_annex_deletelog_nd_"+map.get("year"));

        //国家级地块退回
        map.put("wp_cj_gjjthdk_nd","wp_cj_gjjthdk_nd_"+map.get("year"));

        //pdf
        map.put("wp_cj_pdfinfo","wp_cj_pdfinfo_"+map.get("year"));
        map.put("wp_cj_hcjgsm","wp_cj_hcjgsm_"+map.get("year"));

        return map;
    }

    public static ModelMap TableName(ModelMap map){
        if ("null".equals(map.get("year"))) {
            return map;
        }
        map.put("wp_cj_tbxxb","wp_cj_tbxxb_"+map.get("year"));
        map.put("wp_cj_dkxxb","wp_cj_dkxxb_"+map.get("year"));
        map.put("wp_cj_hcrwfpdw","wp_cj_hcrwfpdw_"+map.get("year"));
        map.put("wp_cj_hcrwfpjl","wp_cj_hcrwfpjl_"+map.get("year"));
        map.put("wp_cj_shfpb","wp_cj_shfpb_"+map.get("year"));
        map.put("wp_cj_tbhcjg","wp_cj_tbhcjg_"+map.get("year"));
        map.put("wp_cj_tbhcjg_hftgzmwj","wp_cj_tbhcjg_hftgzmwj_"+map.get("year"));
        map.put("wp_cj_tbhcjg_qtpzwh","wp_cj_tbhcjg_qtpzwh_"+map.get("year"));
        map.put("wp_cj_tbhcjg_qtsftgxxydss","wp_cj_tbhcjg_qtsftgxxydss_"+map.get("year"));
        map.put("wp_cj_tbhcjg_qtsfzygd","wp_cj_tbhcjg_qtsfzygd_"+map.get("year"));
        map.put("wp_cj_tbhcjg_wfpzwh","wp_cj_tbhcjg_wfpzwh_"+map.get("year"));
        map.put("wp_cj_tbhcjg_wftgzmwj","wp_cj_tbhcjg_wftgzmwj_"+map.get("year"));
        map.put("wp_cj_shtb","wp_cj_shtb_"+map.get("year"));
        map.put("wp_cj_thtb","wp_cj_thtb_"+map.get("year"));
        map.put("wp_cj_zgtb","wp_cj_zgtb_"+map.get("year"));
        map.put("wp_cj_fjinfo","wp_cj_fjinfo_"+map.get("year"));
        map.put("wp_cj_dict_fjlx","wp_cj_dict_fjlx_"+map.get("year"));
        map.put("wp_cj_pwinfo","wp_cj_pwinfo_"+map.get("year"));
        map.put("wp_cj_hcrwkc","wp_cj_hcrwkc_"+map.get("year"));
        map.put("wp_cj_thxzq","wp_cj_thxzq_"+map.get("year"));
        map.put("wp_cj_fpdw","wp_cj_fpdw_"+map.get("year"));
        map.put("wp_cj_dkxxbsj","wp_cj_dkxxbsj_"+map.get("year"));
        map.put("wp_cj_fjinfosj","wp_cj_fjinfosj_"+map.get("year"));
        map.put("wp_cj_pwinfosj","wp_cj_pwinfosj_"+map.get("year"));
        map.put("wp_cj_tbhcjgsj","wp_cj_tbhcjgsj_"+map.get("year"));
        map.put("wp_cj_tbhcjgsj_hftgzmwj","wp_cj_tbhcjgsj_hftgzmwj_"+map.get("year"));
        map.put("wp_cj_tbhcjgsj_qtpzwh","wp_cj_tbhcjgsj_qtpzwh_"+map.get("year"));
        map.put("wp_cj_tbhcjgsj_qtsftgxxydss","wp_cj_tbhcjgsj_qtsftgxxydss_"+map.get("year"));
        map.put("wp_cj_tbhcjgsj_qtsfzygd","wp_cj_tbhcjgsj_qtsfzygd_"+map.get("year"));
        map.put("wp_cj_tbhcjgsj_wfpzwh","wp_cj_tbhcjgsj_wfpzwh_"+map.get("year"));
        map.put("wp_cj_tbhcjgsj_wftgzmwj","wp_cj_tbhcjgsj_wftgzmwj_"+map.get("year"));

        map.put("wp_dsfjd_tbhcjg","wp_dsfjd_tbhcjg_"+map.get("year"));
        map.put("wp_dsfjd_tbhcjg_hftgzmwj","wp_dsfjd_tbhcjg_hftgzmwj_"+map.get("year"));
        map.put("wp_dsfjd_tbhcjg_qtpzwh","wp_dsfjd_tbhcjg_qtpzwh_"+map.get("year"));
        map.put("wp_dsfjd_tbhcjg_qtsftgxxydss","wp_dsfjd_tbhcjg_qtsftgxxydss_"+map.get("year"));
        map.put("wp_dsfjd_tbhcjg_qtsfzygd","wp_dsfjd_tbhcjg_qtsfzygd_"+map.get("year"));
        map.put("wp_dsfjd_tbhcjg_wfpzwh","wp_dsfjd_tbhcjg_wfpzwh_"+map.get("year"));
        map.put("wp_dsfjd_tbhcjg_wftgzmwj","wp_dsfjd_tbhcjg_wftgzmwj_"+map.get("year"));

        //年度填报
        map.put("wp_cj_tbxxbxj_nd","wp_cj_tbxxbxj_nd_"+map.get("year"));
        map.put("wp_cj_dkxxbxj_nd","wp_cj_dkxxbxj_nd_"+map.get("year"));
        map.put("wp_cj_dkxxbxj_nd_pw","wp_cj_dkxxbxj_nd_pw_"+map.get("year"));
        map.put("wp_cj_dkxxbxj_nd_lz","wp_cj_dkxxbxj_nd_lz_"+map.get("year"));
        map.put("wp_cj_fjinfo_nd","wp_cj_fjinfo_nd_"+map.get("year"));
        map.put("wp_cj_pwinfo_nd","wp_cj_pwinfo_nd_"+map.get("year"));
        map.put("wp_cj_tbhcjgshij_nd","wp_cj_tbhcjgshij_nd_"+map.get("year"));
        map.put("wp_cj_tbhcjgsj_nd","wp_cj_tbhcjgsj_nd_"+map.get("year"));
        map.put("wp_cj_tbhcjgsj_nd_hftgzmwj","wp_cj_tbhcjgsj_nd_hftgzmwj_"+map.get("year"));
        map.put("wp_cj_tbhcjgsj_nd_qtpzwh","wp_cj_tbhcjgsj_nd_qtpzwh_"+map.get("year"));
        map.put("wp_cj_tbhcjgsj_nd_qtsftgxxydss","wp_cj_tbhcjgsj_nd_qtsftgxxydss_"+map.get("year"));
        map.put("wp_cj_tbhcjgsj_nd_qtsfzygd","wp_cj_tbhcjgsj_nd_qtsfzygd_"+map.get("year"));
        map.put("wp_cj_tbhcjgsj_nd_wfpzwh","wp_cj_tbhcjgsj_nd_wfpzwh_"+map.get("year"));
        map.put("wp_cj_tbhcjgsj_nd_wftgzmwj","wp_cj_tbhcjgsj_nd_wftgzmwj_"+map.get("year"));
        map.put("wp_cj_tbxxbxj_nd","wp_cj_tbxxbxj_nd_"+map.get("year"));
        map.put("wp_cj_gsinfoly_nd","wp_cj_gsinfoly_nd_"+map.get("year"));
        //年度外业
        map.put("re_task_nd","re_task_nd_"+map.get("year"));
        map.put("re_taskdetail_nd","re_taskdetail_nd_"+map.get("year"));
        map.put("re_taskdetail_annex_nd","re_taskdetail_annex_nd_"+map.get("year"));
        map.put("re_taskdetail_annex_deletelog_nd","re_taskdetail_annex_deletelog_nd_"+map.get("year"));

        //国家级地块退回
        map.put("wp_cj_gjjthdk_nd","wp_cj_gjjthdk_nd_"+map.get("year"));

        //pdf
        map.put("wp_cj_pdfinfo","wp_cj_pdfinfo_"+map.get("year"));
        map.put("wp_cj_hcjgsm","wp_cj_hcjgsm_"+map.get("year"));

        return map;
    }
}
